Skip to main content

All Questions

Tagged with
0votes
1answer
646views

Sort Stack using just an additional stack

The problem is from the cracking coding Interview programming book. The problem is that: Sort Stack: Write a program to sort a stack such that the smallest items are on the top. You can use an ...
sweetyBaby's user avatar
2votes
1answer
372views

Sorting lists by various measures of goodness [closed]

...
Azula's user avatar
3votes
0answers
732views

Parallel Merge Sort in Scala

I have been trying to implement parallel merge sort in Scala. My current implementation is about as fast as .sorted, but I have no idea what would be the right ...
warbaque's user avatar
3votes
2answers
2kviews

Bubble sort in Scala

I wanted to implement a bubble sort in Scala following the steps described in: http://www.bbc.co.uk/education/guides/z22wwmn/revision/3 ...
Gids's user avatar
  • 133
3votes
1answer
326views

Is there a better way to return values with merge sort?

I have been attempting to learn Scala lately and so have produced a couple of different sorting algorithms to build up my basics. I think I have been lucky with the methods returning exactly what I ...
BoydyBoydy's user avatar
5votes
3answers
710views

How can I make my isSorted function faster? [closed]

I made an isSorted function in Scala and Java as well and when I measured the time of functions' run I saw that the Scala version was very slow. It ran about 3.2 ...
bitli's user avatar
1vote
1answer
311views

Counting inversions

I'm trying to implement an inversion counting routine in Scala in a functional way (I don't want to port Java solution) but have real troubles with it. The sorting routine works fine but adding the ...
synapse's user avatar
9votes
1answer
5kviews

Merge sort in Scala

I've implemented merge sort in Scala: ...
chris's user avatar

close